package com.zhiyou.books.controller;

import com.zhiyou.books.pojo.TelBook;
import com.zhiyou.books.service.TelBookService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping(value = "/telbooks")
public class TelBookController {

    @Autowired
    public TelBookService telBookService;

    @GetMapping(value = "/getAllTels")
    public List<TelBook> getAllTels(){
        return telBookService.getTelNo();
    }
}
